<div class="tile">
	<div class="nav">
		<div class="nav-li focus">分类管理</div>
	</div>

	<hr />

	<div class="bigbox">
		
		<div class="tiles-box">
			<div class="add-tag">
				<input maxlength="5" type="text" bind-input="{{'$Cache.tag.new_tag_name'}}">
				<button event-click="{{'$Event.tag.add_new_tag'}}">添加分类</button>
			</div>
			{{#each $Cache.bus_tags_detail}}
			<div class="tiles" event-click="{{'$Top.$Event.tile.to_editing'}}" class="tile-title">
					{{tag_name}}
			</div>
			{{/each}}

			{{#if $Cache.tile.editing_tag}}
			<div class="goods-box">
				<div class="tile-goods">
					<div class="titlein">当前选定标签：
						{{#if $Cache.tile.is_in_rename_tag}}
						<input type="text" value="{{$Cache.tile.editing_tag.tag_name}}" bind-input="{{'$Cache.tile.editing_tag.tag_name'}}">
						<button event-click="{{'$Event.tile.submit_new_tag_name'}}">确认</button>
						<button event-click="{{'$Event.tile.cancel_new_tag_name'}}">取消</button>
						{{#else}}
						<span>{{$Cache.tile.editing_tag.tag_name}}</span>
						<button event-click="{{'$Event.tile.to_rename_tag'}}" class="icon-quill" title="重命名标签"></button>
						{{/if}}
						<button class="delete icon-remove2" event-click="{{'$Event.tile.remove_tag'}}" title="删除此标签"></button>
					</div>
					<table class="box">
						{{#if $Cache.tile.editing_tag.detail_content.length}}
						{{#each $Cache.tile.editing_tag.detail_content}}
						<tr class="item">
							<td  class="img">
								<img class="goods-img" bind-src="{{preview_img_url}}?imageView/1/w/25/h/25" />
							</td>
							<td class="info">
								{{goods_name}}
							</td>
							<td>
								<button event-click="{{'$Top.$Event.tile.remove_goods_from_tag'}}" class="delete icon-remove2" title="删除此商品"></button>

							</td>
						</tr>
						{{/each}}
						{{#else}}
						此分类下还没有商品
						{{/if}}
					</table>
				</div>

				<div class="search-goods">
					<div class="title"><input bind-input="{{'$Cache.tile.search_text'}}" type="text" class="search-text" event-input="{{'$Event.tile.search'}}" /><button class="search icon-search"  title="搜索商品"></button></div>
					<table class="box">
						{{#each $Cache.tile.goods}}
						<tr class="item">
							<td  class="img">
								<img class="goods-img" bind-src="{{preview_img_url}}?imageView/1/w/25/h/25" />
							</td>
							<td class="info">
								{{goods_name}}
							</td>
							<td>
								<button event-click="{{'$Top.$Event.tile.add_goods_to_tag'}}" class="add" title="添加到选定标签">+</button>
							</td>
						</tr>
						{{/each}}
						<!-- <tr class="item">
							<td  class="img">
								<img class="goods-img" src="./images/roll2.jpg" />
							</td>
							<td class="info">
								葡萄
							</td>
							<td class="btn">
								<button class="add" title="添加到选定标签">+</button>
							</td>
						</tr> -->
					</table>
				</div>
			</div>
			{{/if}}
		</div>

	</div>

</div>

